Field of the Invention
The present invention relates to an image processing apparatus, an image processing method and a program for achieving the image processing method.
Description of the Related Art
A book scanner has been widely used as a device for easily recording the contents of a book as data. As one of various kinds of book scanners, the stand-type book scanner capable of scanning the book by doing nothing but turning over the pages thereof without destructing the book itself has been known. More specifically, the stand-type book scanner photographs the book by a camera provided above and obtains the image of the photographed book.
Incidentally, as the image of the book, a user requires the contents such as characters, figures and the like described on the double-spread pages of the book. For example, the information of a portion such as the small cut end of the book at which the page edges pile up, the information of the background image of the book, and the like are unnecessary image information for the user in most cases. Nevertheless, it is difficult to automatically discriminate the unnecessary image information like this from the image photographed by the camera. Namely, in the case where the conventional book scanner is used, since the scanned results often include the unnecessary image information, the user has to manually retouch the photographed image, thereby taking a great deal of time.
Therefore, it is an important requirement for the book scanner to automatically obtain the contour of the spread page edge of the book without a manual retouch. Here, as a means for detecting the contour of an object (target), there is a means for detecting the contour of the object by obtaining not only luminance image information of the object but also distance image information (or range image information) of the object from a distance sensor. The distance image information is robust in regard to a change of environmental light. Therefore, even if it is difficult to detect the contour based on the luminance image information, it is possible to detect the relevant contour based on the distance image information. However, in case of a particularly inexpensive distance sensor, it is difficult to obtain high-accuracy contour information. To cope with such a problem, there is a conventional method of detecting the contour based on the luminance image information by using, as a clue, the contour obtained from the distance information. As the conventional technique of obtaining the contour of the object based on the distance information and the luminance image information, there is the technique of Japanese Patent Application Laid-Open No. 2002-117403. More specifically, it is disclosed in Japanese Patent Application Laid-Open No. 2002-117403 that a distance image is first divided into a plurality of grids, the grids of which the distance differences from the respective adjacent grids are larger than the predetermined threshold are narrowed as the grids in which the boundary between the background and the object exist, and the boundary between the background and the object is decided based on the luminance image information within the range of the narrowed grids. Thus, by the technique of Japanese Patent Application Laid-Open No. 2002-117403, it is possible to robustly detect the contour with a simple process even when the illumination is changed.
However, the technique of Japanese Patent Application Laid-Open No. 2002-117403 is to narrow the range in which the object and the background exist by the distance image information, and obtain the boundary by the luminance image information within the narrowed range. Therefore, there is a problem that the contour of the spread page edge of the book is not obtained but the contour of the entire book is obtained. Besides, the plurality of contours appear in the vicinity of the spread page edge due to the portion such as the small cut end of the book at which the pages pile up. However, it is difficult by the technique of Japanese Patent Application Laid-Open No. 2002-117403 to specify which contour should be detected, from among the plurality of contours.